package com.jiyun.baobei.controller;

import com.jiyun.baobei.service.BaoBeiService;
import com.jiyun.baobei.service.LuyiinService;
import com.jiyun.pojo.baobei.BaoBei;
import com.jiyun.pojo.baobei.BaoBeiVo;
import com.jiyun.pojo.luyin.Luyin;
import com.jiyun.pojo.result.ResultVo;
import com.jiyun.pojo.user.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * 文件名:BaobeiController
 * 创建者: 闫俊涛
 * 创建时间:2022/6/25 20:51
 * 描述:这是一个实例
 */
@RestController
@RequestMapping("baobei")
public class BaobeiController {
    @Autowired
    private BaoBeiService baoBeiService;
    @Autowired
    private LuyiinService luyiinService;
    // 面试报备添加
    @RequestMapping("add")
    public ResultVo adto(@RequestBody BaoBei  baoBei){

       return baoBeiService.adto(baoBei);
    }
    // 面试报备查询历史
    @RequestMapping("listAll")
    public List<BaoBeiVo> listAll(Integer id){

        return baoBeiService.listAll(id);
    }

    // 面试报备查询 今日
    @RequestMapping("listAllJr")
    public List<BaoBeiVo> listAllJr(Integer id){

        return baoBeiService.listAllJr(id);
    }

    // 面试报备查询 今日
    @RequestMapping("listAllMr")
    public List<BaoBeiVo> listAllMr(Integer id){

        return baoBeiService.listAllMr(id);
    }

    // 我的统计
    /**
     * 用户id
     * @param id
     * @return
     */
    @RequestMapping("Tong")
    public ResultVo  Tong(Integer id){
        return  baoBeiService.Tong(id);
    }


    // 我的录音上传
    @RequestMapping("yuyin")

    public  ResultVo addfile (@RequestBody Luyin luyin){
        return luyiinService.addfile(luyin);
    }







}
